﻿@model eBusiness.Models.Status
@{
    ViewBag.Title = "Details";
    Layout = "../Shared/_Layout.cshtml";
}
<h2>
    Details</h2>
<fieldset>
    <legend>Status</legend>
    <table class="dashboardTable">
        <tr>
            <td class="display-field" colspan="2">
                <h3>@Html.DisplayFor(model => model.Name)</h3>
            </td>
        </tr>
        <tr>
            <td class="display-label">
                Description
            </td>
            <td class="display-field">
                @Html.DisplayFor(model => model.Description)
            </td>
        </tr>
        <tr>
            <td class="display-label">
                IsDeleted
            </td>
            <td class="display-field">
                @Html.DisplayFor(model => model.IsDeleted)
            </td>
        </tr>
        <tr>
            <td class="display-label">
                CreatedBy
            </td>
            <td class="display-field">
                @{
                    if (!string.IsNullOrEmpty(Model.CreatedBy.ToString()))
                    {
                        var membershipUser = Membership.GetUser(Model.CreatedBy);
                        if (membershipUser != null)
                        {
                            var usr = membershipUser.UserName;
                    @usr
                        }
                    }
                }
            </td>
        </tr>
        <tr>
            <td class="display-label">
                CreatedDate
            </td>
            <td class="display-field">
                @if (!string.IsNullOrEmpty(@Model.CreatedDate.ToString()))
                {
                    @Model.CreatedDate.ToString("dd/MM/yyyy")
                }
            </td>
        </tr>
        <tr>
            <td class="display-label">
                ModifiedBy
            </td>
            <td class="display-field">
                @{
                    if (!string.IsNullOrEmpty(Model.CreatedBy.ToString()))
                    {
                        var membershipUser = Membership.GetUser(Model.CreatedBy);
                        if (membershipUser != null)
                        {
                            var usr = membershipUser.UserName;
                    @usr
                        }
                    }
                }
            </td>
        </tr>
        <tr>
            <td class="display-label">
                ModifiedDate
            </td>
            <td class="display-field">
                @if (!string.IsNullOrEmpty(@Model.ModifiedDate.ToString()))
                {
                    @Model.ModifiedDate.Value.ToString("dd/MM/yyyy")
                }
            </td>
        </tr>
    </table>
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id = Model.ID }) |
    @Html.ActionLink("Back to List", "Index")
</p>
